package org.pearl.thread.demo.test002;

/**
 * Created by TD on 2021/4/19
 */
public class SyncTest002 {

    private static final Object MUTEX=new Object();

    public static void main(String[] args) {

        new Thread(()->{
            synchronized (MUTEX){
                System.out.println(Thread.currentThread().getName()+"获取到锁一");
                synchronized (MUTEX){
                    System.out.println(Thread.currentThread().getName()+"获取到锁二");
                }
            }
        }).start();
    }
}
